<%@page import="java.util.Enumeration"%>
<style type="text/css">
.styleGuideTab1 {
	color: #4e4e4e;
	background-color: #FAFAFA;
	font-family: Arial;
	font-size: 11px;
	font-weight: bold;
	padding-left: 16px;
	padding-right: 16px;
}

.styleGuideTab1 A:hover {
	color: #4e4e4e;
	text-decoration: underline;
}

.styleGuideTab2 {
	color: #4e4e4e;
	background-color: #EDEDED;
	font-family: Arial;
	font-size: 11px;
	font-weight: bold;
	padding-left: 16px;
	padding-right: 16px;
}

.styleGuideTab2 A:hover {
	color: #4e4e4e;
	text-decoration: underline;
}

.styleGuideTab3 {
	color: #4e4e4e;
	background-color: #FAFAFA;
	font-family: Arial;
	font-size: 11px;
	font-weight: bold;
	padding-left: 20px;
	padding-right: 20px;
}

.styleGuideTab3 A:hover {
	color: #4e4e4e;
	text-decoration: underline;
}

.styleGuideTab4 {
	color: #4b4b4b;
	font-family: Arial;
	font-size: 10px;
	font-weight: bold;
	padding-top: 5px;
	padding-bottom: 5px;
	padding-right: 20px;
}

#dropmenudiv {
	color: #4e4e4e;
	position: absolute;
	border: 1px solid black;
	border-bottom-width: 0;
	font: normal 11px Arial;
	line-height: 18px;
	z-index: 100;
}

#dropmenudiv a {
	background-color: #EDEDED;
	color: #4e4e4e;
	width: 100%;
	display: block;
	text-indent: 0px;
	text-align: left;
	border-bottom: 1px solid black;
	padding: 1px 0;
	text-decoration: none;
	font-weight: bold;
}

#dropmenudiv a:hover { /*hover background color*/
	background-color: #EDEDED;
}

.timertext {
	text-color: #4b4b4b;
	font-family: Arial;
	font-size: 10px;
	font-weight: bold;
}

#input_box {
	background-color: #F4F4F4;
	font-family: Arial;
	font-size: 10px;
	color: #4b4b4b;
}
</style>

<script type="text/javascript" language="javascript">
	//Contents Menu with Out of Box link
	var menuM = new Array();
	menuM[0] = '<a href="../plugins/LookandFeel/Lang_1033/MicroStrategy_Web_Help.htm" target="_new" title="MicroStrategy Web Help" target="_new">MicroStrategy Web Help</a>';

	var menuwidth = '160px'; //default menu width
	var menubgcolor = '#EDEDED'; //menu bgcolor
	var disappeardelay = 250; //menu disappear speed onMouseout (in miliseconds)
	var hidemenu_onclick = "yes"; //hide menu when user clicks within menu?

	/////No further editting needed

	var ie4 = document.all
	var ns6 = document.getElementById && !document.all

	if (ie4 || ns6)
		document
				.write('<div id="dropmenudiv" style="visibility:hidden;width:'
						+ menuwidth
						+ ';background-color:'
						+ menubgcolor
						+ '" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

	function getposOffset(what, offsettype) {
		var totaloffset = (offsettype == "left") ? what.offsetLeft
				: what.offsetTop;
		var parentEl = what.offsetParent;
		while (parentEl != null) {
			totaloffset = (offsettype == "left") ? totaloffset
					+ parentEl.offsetLeft : totaloffset + parentEl.offsetTop;
			parentEl = parentEl.offsetParent;
		}
		return totaloffset;
	}

	function showhide(obj, e, visible, hidden, menuwidth) {
		if (ie4 || ns6)
			dropmenuobj.style.left = dropmenuobj.style.top = "-500px"
		if (menuwidth != "") {
			dropmenuobj.widthobj = dropmenuobj.style
			dropmenuobj.widthobj.width = menuwidth
		}
		if (e.type == "click" && obj.visibility == hidden
				|| e.type == "mouseover")
			obj.visibility = visible
		else if (e.type == "click")
			obj.visibility = hidden
	}

	function iecompattest() {
		return (document.compatMode && document.compatMode != "BackCompat") ? document.documentElement
				: document.body
	}

	function clearbrowseredge(obj, whichedge) {
		var edgeoffset = 0
		if (whichedge == "rightedge") {
			var windowedge = ie4 && !window.opera ? iecompattest().scrollLeft
					+ iecompattest().clientWidth - 15 : window.pageXOffset
					+ window.innerWidth - 15
			dropmenuobj.contentmeasure = dropmenuobj.offsetWidth
			if (windowedge - dropmenuobj.x < dropmenuobj.contentmeasure)
				edgeoffset = dropmenuobj.contentmeasure - obj.offsetWidth
		} else {
			var topedge = ie4 && !window.opera ? iecompattest().scrollTop
					: window.pageYOffset
			var windowedge = ie4 && !window.opera ? iecompattest().scrollTop
					+ iecompattest().clientHeight - 15 : window.pageYOffset
					+ window.innerHeight - 18
			dropmenuobj.contentmeasure = dropmenuobj.offsetHeight
			if (windowedge - dropmenuobj.y < dropmenuobj.contentmeasure) { //move up?
				edgeoffset = dropmenuobj.contentmeasure + obj.offsetHeight
				if ((dropmenuobj.y - topedge) < dropmenuobj.contentmeasure) //up no good either?
					edgeoffset = dropmenuobj.y + obj.offsetHeight - topedge
			}
		}
		return edgeoffset
	}

	function populatemenu(what) {
		if (ie4 || ns6)
			dropmenuobj.innerHTML = what.join("")
	}

	function dropdownmenu(obj, e, menucontents, menuwidth) {
		if (window.event)
			event.cancelBubble = true
		else if (e.stopPropagation)
			e.stopPropagation()
		clearhidemenu()
		dropmenuobj = document.getElementById ? document
				.getElementById("dropmenudiv") : dropmenudiv
		populatemenu(menucontents)

		if (ie4 || ns6) {
			showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
			dropmenuobj.x = getposOffset(obj, "left")
			dropmenuobj.y = getposOffset(obj, "top")
			dropmenuobj.style.left = dropmenuobj.x
					- clearbrowseredge(obj, "rightedge") + "px"
			dropmenuobj.style.top = dropmenuobj.y
					- clearbrowseredge(obj, "bottomedge") + obj.offsetHeight
					+ "px"
		}

		return clickreturnvalue()
	}
	function dropdownmenu1(obj, e, menucontents, menuwidth) {
		if (window.event)
			event.cancelBubble = true
		else if (e.stopPropagation)
			e.stopPropagation()
		clearhidemenu()
		dropmenuobj = document.getElementById ? document
				.getElementById("dropmenudiv") : dropmenudiv
		populatemenu(menucontents)

		if (ie4 || ns6) {
			showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
			dropmenuobj.x = getposOffset(obj, "left")
			dropmenuobj.y = getposOffset(obj, "top")
			dropmenuobj.style.left = dropmenuobj.x
					- clearbrowseredge(obj, "rightedge") + "px"
			dropmenuobj.style.top = dropmenuobj.y
					- clearbrowseredge(obj, "bottomedge") + obj.offsetHeight
					+ "px"
		}

		return clickreturnvalue1()
	}
	function clickreturnvalue() {
		if (ie4 || ns6)
			return false
		else
			return true
	}
	function clickreturnvalue1() {
		if (ie4 || ns6)
			return false
		else
			return true
	}
	function contains_ns6(a, b) {
		while (b.parentNode)
			if ((b = b.parentNode) == a)
				return true;
		return false;
	}

	function dynamichide(e) {
		if (ie4 && !dropmenuobj.contains(e.toElement))
			delayhidemenu()
		else if (ns6 && e.currentTarget != e.relatedTarget
				&& !contains_ns6(e.currentTarget, e.relatedTarget))
			delayhidemenu()
	}

	function hidemenu(e) {
		if (typeof dropmenuobj != "undefined") {
			if (ie4 || ns6)
				dropmenuobj.style.visibility = "hidden"
		}
	}

	function delayhidemenu() {
		if (ie4 || ns6)
			delayhide = setTimeout("hidemenu()", disappeardelay)
	}

	function clearhidemenu() {
		if (typeof delayhide != "undefined")
			clearTimeout(delayhide)
	}

	if (hidemenu_onclick == "yes")
		document.onclick = hidemenu

	function delayhidemenu1() {
		if (ie4 || ns6)
			delayhide = setTimeout("hidemenu()", disappeardelay)
	}
	//script for Session Timer

	timedouturl = " ";
	function Minutes(data) {
		for (var i = 0; i < data.length; i++)
			if (data.substring(i, i + 1) == ":")
				break;
		return (data.substring(0, i));
	}
	function Seconds(data) {
		for (var i = 0; i < data.length; i++)
			if (data.substring(i, i + 1) == ":")
				break;
		return (data.substring(i + 1, data.length));
	}
	function Display(min, sec) {
		var disp;
		if (min <= 9)
			disp = " 0";
		else
			disp = " ";
		disp += min + ":";
		if (sec <= 9)
			disp += "0" + sec;
		else
			disp += sec;
		return (disp);
	}
	function Down() {
		sec--;
		if (sec == -1) {
			sec = 59;
			min--;
		}
		document.timerform.clock.value = Display(min, sec);
		window.status = "Session Expires in: " + Display(min, sec);
		if (min == 0 && sec == 0) {
			alert("Your session has timed out.");
			//window.location.href = timedouturl;
		} else
			down = setTimeout("Down()", 1000);
	}
	function timeIt() {

		min = 1 * Minutes(document.timerform.clock.value);
		sec = 0 + Seconds(document.timerform.clock.value);
		Down();
	}

	//window.onload = timeIt
</script>
<%
	/****
	 * Generic_ShortcutsBar.jsp
	 * This file includes the default content of the shorcuts bar section.
	 * This consist on the toolbar link, a search box, and logout and help links.
	 *
	 * Copyright 2004 MicroStrategy Incorporated. All rights reserved.
	 * version: 1.2
	 * xhtml: true
	 ****/
%><%@ page errorPage="JSP_Error.jsp"%><%@ page
	contentType="text/html; charset=UTF-8"%><%@ taglib
	uri="/WEB-INF/tlds/webUtilTL.tld" prefix="web"%>
<%-- Render the toolbar section if the user has a session. --%>





<TABLE width="100%" bgcolor="#F4F4F4" height="100">

	<tr>
		<td rowspan="3" nowrap="nowrap" align="center"><img
			src="../plugins/LookandFeel/style/images/Amex_Blue.png" width="80"
			height="70"></td>
		<td nowrap="nowrap" align="right">
			<table width="100%">
				<tr NOWRAP>
					<td width=97%>&nbsp;</td>
					<td class=styleGuideTab1 NOWRAP width=1%>
						<!-- <a href="/plugins/LookandFeel/jsp/searchUser.jsp" target="_blank">User Manager</a> -->
						<% 
							System.out.println("==-========================================");
							Enumeration<String> names = session.getAttributeNames();
							while(names.hasMoreElements()) {
								String name = names.nextElement();
								Object value = session.getAttribute(name);
								System.out.println("  " + name + " : " + value);
							}
							System.out.println("==-========================================");
						%>
						<a href="mstrWeb?pg=searchUser">User Manager</a> 
						<!-- <br><br>
						<a href="mstrWeb?pg=preApproved&Server=localhost" target="_blank">preApproved</a>
						<br><br>
						<a href="mstrWeb?pg=MsgEPA" target="_blank">MsgEPA</a>
						<br><br>
						<a href="mstrWeb?pg=EPACnf&Server=localhost" target="_blank">EPACnf</a>
						<br><br>
						<a href="mstrWeb?pg=PACnf&Server=localhost" target="_blank">PACnf</a> -->
						<!-- <br><br>
						<a href="mstrWeb?pg=eup&Server=localhost" target="_blank">Edit Profile</a> -->
						
					</td>
					<%-- <%
						Object ObjMCSTypeCd = session.getAttribute("MCSTypeCd");
						String MCSTypeCd="";
						if(ObjMCSTypeCd != null)
							{
								MCSTypeCd = ObjMCSTypeCd.toString();
							}
						if("02".equals(MCSTypeCd))
						{
					%>
					<td class=styleGuideTab1 NOWRAP width=1%>
						<a href="/giid/UserManager.do" >User Manager</a>
					</td>
					<%
						}
					%> --%>

					<td class=styleGuideTab2 NOWRAP width=1%><span><a
							href="default.htm" onClick="return clickreturnvalue()"
							onMouseover="dropdownmenu(this, event, menuM, '150px')"
							onMouseout="delayhidemenu()">Knowledge Database<img
								src="images/1arrow_down.gif" alt="arrowdown" /></a></span></td>
					<td class=styleGuideTab3 NOWRAP width=1%>
						<%-- Display a URL pointing to eTrainer.--%> <%@include
							file='/plugins/LookandFeel/jsp/eTrainer_Section.jsp'%>
						<%-- Render the logout button if the user has a session. --%> <web:descriptor
							key="mstrWeb.859" desc="Welcome" /> <b> <web:connectionValue
								property="userName" /></b>,&nbsp <span><web:urlEvent
								eventID="com.microstrategy.web.app.beans.EnumServletEvents.WebEventLogout">
								<web:descriptor key="mstrWeb.8" desc="Logout" />
							</web:urlEvent></span>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td class=styleGuideTab4 align="right" nowrap="nowrap" height=20>
			<form name="timerform">
				Session Expires in:<input type="text" id="input_box" name="clock"
					size="3" value="30:00" style="border: 1px solid #F4F4F4">
			</form>
		</td>

	</tr>
	<tr>
		<td align="right" nowrap="nowrap"></br></td>
	</tr>
</TABLE>
<jsp:include page="ProjectsPageHeader.jsp"></jsp:include>
<script>
	timeIt();
</script>